package dao

import "geekbang-go-homework/module1/dao/po"

type UserDao interface {
	Get(id int) (*po.User, error)
}

func NewUserDao(driverName string) UserDao {
	switch driverName {
	case "mongo":
		return &UserMongoDB{}
	default:
		return &UserMySQL{}
	}
}
